<script setup>
import { computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app';
import { useStore } from "vuex";
import {WEB_BASE_URL} from "@/utils/constant";

const store = useStore()
const cozeAccessToken = computed(() => store.getters.getCozeAccessToken)

const webViewSrc = computed(() => {
	return `${WEB_BASE_URL}customer-service?accessToken=${cozeAccessToken.value}`
})

const loadComplete = () => {
	uni.hideLoading()
}


onLoad(() => {
	uni.showLoading({
		title: '初始化中...'
	})
})
</script>

<template>
	<view>
		<web-view
			:src="webViewSrc"
			:update-title="false"
			@load="loadComplete"
		/>
	</view>
</template>

<style scoped>

</style>